Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup prerelease for streaming aggregate events #115

Merged
merged 17 commits into from
Sep 12, 2022
Merged

Conversation

woksin
Copy link
Contributor

@woksin woksin commented Aug 30, 2022

Summary

Adds functionality that enables streaming of FetchForAggregateResponse and filtering of aggregate events based on event type. This is to be able to write an aggregate root rehydration implementation in the SDKs that only fetches the events that are relevant for rehydration and also fixes the problem that fetch for aggregate responses could be too large.

Added

  • aggregateRootVersion (field 7) on the inner CommittedAggregateEvent message in the CommittedAggregateEvents message. It represents the aggregate root version that the event was applied to
  • FetchForAggregateInBatches method to EventStore which takes in a FetchForAggregateInBatchesRequest and streams back FetchForAggregateResponse

Deprecated

  • aggregateRootVersion (field 3) on CommittedAggregateEvents it represents the aggregate root version of the last event in the events sequence, it is now replaced by currentAggregateRootVersion (field 5) which represents the current aggregate root version of the aggregate regardless of how many events are included in the sequence

@woksin woksin added the minor label Aug 30, 2022
Copy link
Contributor

@joelhoisko joelhoisko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can see that Magne already approved this, and the code looks fine so I will too. Just got a comment about the option deprecated = true; that you could maybe use but it's not important.

Source/Runtime/Events/EventStore.proto Show resolved Hide resolved
@woksin woksin merged commit 90ed4b9 into master Sep 12, 2022
@woksin woksin deleted the 7.4.0-treebeard branch September 12, 2022 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants